package com.hzqy.service.pricesensitiveuser;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import javax.annotation.Resource;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;

import com.hzqy.persistence.dao.pricesensitiveuser.PriceSensitiveUsersDao;
import com.hzqy.service.core.GenericServiceBean;
import com.hzqy.web.vo.PriceSensitiveUsersVo;

@Service
public class PriceSensitiveUsersServiceBean extends GenericServiceBean<PriceSensitiveUsersVo,PriceSensitiveUsersDao, Integer> {
	private static final long serialVersionUID = 1L;
	protected final Logger LOG = LoggerFactory.getLogger(getClass());
	
	@Resource
	private PriceSensitiveUsersDao priceSensitiveUsersDao;
	
	@Override
	public PriceSensitiveUsersDao getEntityDao() {
		return priceSensitiveUsersDao;
	}

	public int insertPriceSensitiveUserInfo(PriceSensitiveUsersVo priceSensitiveUsersVo) {
		return priceSensitiveUsersDao.insertPriceSensitiveUserInfo(priceSensitiveUsersVo);
	}
	
	public int updatePriceSensitiveUserCount(PriceSensitiveUsersVo priceSensitiveUsersVo) {
		Map<String,String> map = new HashMap<String,String>();
		map.put("f_psu_serverid", priceSensitiveUsersVo.getF_psu_serverid());
		return priceSensitiveUsersDao.updatePriceSensitiveUserCount(map);
	}
	
	public List<PriceSensitiveUsersVo> selectPriceSensitiveUserList(){
		Map<String,String> map = new HashMap<String,String>();
		return priceSensitiveUsersDao.selectPriceSensitiveUserList(map);
	}
	
	public PriceSensitiveUsersVo selectPriceSensitiveUserByServerid(PriceSensitiveUsersVo priceSensitiveUsersVo){
		Map<String,String> map = new HashMap<String,String>();
		map.put("f_psu_serverid", priceSensitiveUsersVo.getF_psu_serverid());
		return priceSensitiveUsersDao.selectPriceSensitiveUserByServerid(map);
	}
	
}
